package com.demon.net

import kotlinx.coroutines.CoroutineScope

/**
 * <p>
 * [类说明]
 * </p>
 *
 * @author zhaozeyang
 * @since 2020/5/18
 */
interface IExecutor {
    suspend fun <T : Any> executeRequest(
        call: suspend () -> IAppResponse<T>,
        successBlock: (suspend CoroutineScope.() -> Unit)? = null,
        errorBlock: (suspend CoroutineScope.() -> Unit)? = null
    ): ResponseResult<T>
}